<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>修改手机号 - 模切材料小管家</title>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
    <style>
        :root {
            --primary-color: #0052d9;
            --primary-light: #266fe8;
            --bg-color-page: #f5f7fa;
            --bg-color-container: #ffffff;
            --border-color: #e7e7e7;
            --border-color-light: #f0f0f0;
            --border-radius-medium: 6px;
            --text-primary: #1a1a1a;
            --text-secondary: #4e5969;
            --text-placeholder: #86909c;
            --shadow-1: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
            --space-2: 8px;
            --space-3: 12px;
            --space-4: 16px;
            --space-5: 20px;
        }
        
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
        }
        
        body {
            background-color: var(--bg-color-page);
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.5;
        }
        
        .container {
            max-width: 480px;
            margin: 0 auto;
            background: var(--bg-color-container);
            min-height: 100vh;
        }
        
        .header {
            background: var(--primary-color);
            color: white;
            padding: var(--space-4);
            display: flex;
            align-items: center;
            gap: var(--space-4);
        }
        
        .back-btn {
            font-size: 18px;
            cursor: pointer;
            opacity: 0.9;
            transition: opacity 0.2s ease;
        }
        
        .back-btn:hover {
            opacity: 1;
        }
        
        .page-title {
            font-weight: 500;
            font-size: 16px;
        }
        
        .content {
            padding: var(--space-5);
        }
        
        .form-group {
            margin-bottom: var(--space-5);
        }
        
        .form-label {
            display: block;
            margin-bottom: var(--space-2);
            color: var(--text-primary);
            font-size: 14px;
        }
        
        .form-input {
            width: 100%;
            padding: var(--space-3);
            border: 1px solid var(--border-color);
            border-radius: var(--border-radius-medium);
            font-size: 14px;
            color: var(--text-primary);
            transition: border-color 0.2s ease;
        }
        
        .form-input:focus {
            outline: none;
            border-color: var(--primary-color);
        }
        
        .form-input::placeholder {
            color: var(--text-placeholder);
        }
        
        .verify-group {
            display: flex;
            gap: var(--space-2);
        }
        
        .verify-btn {
            flex-shrink: 0;
            padding: var(--space-3) var(--space-4);
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius-medium);
            font-size: 14px;
            cursor: pointer;
            white-space: nowrap;
            transition: background-color 0.2s ease;
        }
        
        .verify-btn:hover {
            background: var(--primary-light);
        }
        
        .verify-btn:disabled {
            background: #c9cdd4;
            cursor: not-allowed;
        }
        
        .submit-btn {
            width: 100%;
            padding: var(--space-3);
            background: var(--primary-color);
            color: white;
            border: none;
            border-radius: var(--border-radius-medium);
            font-size: 16px;
            cursor: pointer;
            margin-top: var(--space-5);
            transition: background-color 0.2s ease;
        }
        
        .submit-btn:hover {
            background: var(--primary-light);
        }
        
        .hint-text {
            font-size: 12px;
            color: var(--text-secondary);
            margin-top: var(--space-2);
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <div class="back-btn" onclick="history.back()">
                <i class="fas fa-arrow-left"></i>
            </div>
            <div class="page-title">修改手机号</div>
        </div>
        
        <div class="content">
            <div class="form-group">
                <label class="form-label">当前手机号</label>
                <input type="text" class="form-input" value="138****5678" disabled>
            </div>
            
            <div class="form-group">
                <label class="form-label">新手机号</label>
                <input type="tel" class="form-input" id="newPhone" placeholder="请输入新手机号" maxlength="11">
            </div>
            
            <div class="form-group">
                <label class="form-label">验证码</label>
                <div class="verify-group">
                    <input type="text" class="form-input" id="verifyCode" placeholder="请输入验证码" maxlength="6">
                    <button class="verify-btn" id="sendCodeBtn" onclick="sendCode()">发送验证码</button>
                </div>
                <div class="hint-text">验证码将发送到新手机号</div>
            </div>
            
            <button class="submit-btn" onclick="submitPhone()">确认修改</button>
        </div>
    </div>
    
    <script>
        let countdown = 60;
        let timer = null;
        
        function sendCode() {
            const phone = document.getElementById('newPhone').value;
            if (!phone || phone.length !== 11) {
                alert('请输入正确的手机号');
                return;
            }
            
            const btn = document.getElementById('sendCodeBtn');
            btn.disabled = true;
            btn.textContent = countdown + 's';
            
            timer = setInterval(() => {
                countdown--;
                if (countdown <= 0) {
                    clearInterval(timer);
                    btn.disabled = false;
                    btn.textContent = '发送验证码';
                    countdown = 60;
                } else {
                    btn.textContent = countdown + 's';
                }
            }, 1000);
            
            alert('验证码已发送到 ' + phone);
        }
        
        function submitPhone() {
            const newPhone = document.getElementById('newPhone').value;
            const verifyCode = document.getElementById('verifyCode').value;
            
            if (!newPhone || newPhone.length !== 11) {
                alert('请输入正确的手机号');
                return;
            }
            
            if (!verifyCode) {
                alert('请输入验证码');
                return;
            }
            
            alert('手机号修改成功');
            history.back();
        }
    </script>
</body>
</html>

